package cn.school.demo.ui.history

import androidx.fragment.app.FragmentManager
import androidx.lifecycle.LiveData
import androidx.lifecycle.ViewModel
import cn.school.demo.MyApplication
import cn.school.demo.pojo.Result
import cn.school.demo.repository.HistoryRepository
import com.blankj.utilcode.util.LogUtils

class HistoryViewPageSubjectViewModel : ViewModel() {

    private val _subjectList = mutableListOf<String>()
    val subjectList: MutableList<String> get() = _subjectList

    fun updateSubjectList(list: MutableList<String>) {
        LogUtils.e(list)
        _subjectList.clear()
        _subjectList.addAll(list)
    }

    fun getList(): LiveData<Result?> =
        HistoryRepository().getAnswerHistory(MyApplication.user!!.sfNumber)


}